import time,random
def draw_lots(func,n):
    cx=0
    while True:
        cx+=1
        if n ==random.randint(1,100):
            break
        time.sleep(0.01)
    func(cx)           
        
def cal_reward(x):
    if x==1:
        hb=1000
    elif x<=3:
        hb=200
    elif x<=10:
        hb=100
    elif x<=50:
        hb=10
    else :
        hb=1
    print("摇奖%d次成功，红包%d元"%(x,hb))   
n=57
draw_lots(cal_reward,n)